package com.yonyou.cyxdms.sysAuth.service.dto;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author shortwarren1
 * @since 2019-07-17
 */
@TableName("tl_login_log")
public class LoginLogPO extends DMSBasePO<LoginLogPO> {

    private static final long serialVersionUID = 1L;
    @TableId("ID")
    private String id;
    @TableField("ndid")
    private String ndid;
    @TableField("empid")
    private String empid;
    @TableField("userid")
    private String userid;
    @TableField("vLogin")
    private String vLogin;
    @TableField("loginTime")
    private LocalDateTime loginTime;
    @TableField("type")
    private String type;
    public LoginLogPO() {
        super();
    }
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNdid() {
        return ndid;
    }

    public void setNdid(String ndid) {
        this.ndid = ndid;
    }

    public String getEmpid() {
        return empid;
    }

    public void setEmpid(String empid) {
        this.empid = empid;
    }

    public LocalDateTime getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(LocalDateTime loginTime) {
        this.loginTime = loginTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getvLogin() {
        return vLogin;
    }

    public void setvLogin(String vLogin) {
        this.vLogin = vLogin;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Override
    public String toString() {
        return "LoginLogPO{" +
                "id='" + id + '\'' +
                ", ndid='" + ndid + '\'' +
                ", empid='" + empid + '\'' +
                ", userid='" + userid + '\'' +
                ", vLogin='" + vLogin + '\'' +
                ", loginTime='" + loginTime + '\'' +
                ", type='" + type + '\'' +
                '}';
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author lsz
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "id");
    }
}
